using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Exercise3
{
    class FruitMachiseGame
    {
        static void Main(string[] args)
        {
            int rel1 = 0;
            int rel2 = 0;
            int rel3 = 0;
            int totalPoints = 0;
            string answer = "yes";
            Boolean flag = true;

            Console.WriteLine("Spin?");
            answer = Console.ReadLine();
            while (answer.Equals("Yes", StringComparison.InvariantCultureIgnoreCase))
            {
                Random rnd = new Random();
                rel1 = rnd.Next(0, 10);
                rel2 = rnd.Next(0, 10);
                rel3 = rnd.Next(0, 10);
                Console.WriteLine("{0} {1} {2}", rel1, rel2, rel3);
                if (rel1 == 9 && rel2 == 9 && rel3 == 9)
                {
                    Console.WriteLine("You have won the Jackpot! (2000 points) ");
                    totalPoints += 2000; //You won jackpot 9 9 9
                }
                else if (rel1 == 9 && rel2 == 9 || rel1 == 9 && rel3 == 9 || rel2 == 9 && rel3 == 9)
                {
                    Console.WriteLine("You have won the 200 points!");
                    totalPoints += 200; //You match 2 of 9
                }
                else if (rel1 == rel2 && rel1 == rel3 && rel2 == rel3)
                {
                    Console.WriteLine("You have won 15 points!");
                    totalPoints += 15; //You match 2 numbers (1-8)
                }
                else if (rel1 == rel2 || rel1 == rel3 || rel2 == rel3)
                {
                    Console.WriteLine("You have won 5 points!");
                    totalPoints += 5; //You match 3 numbers (1-8)
                }
                else
                {
                    Console.WriteLine("You have not won!!!");
                }
                Console.WriteLine("you points are: {0}", totalPoints);
                Console.WriteLine("---------------------------------------");
                Console.WriteLine("Spin?");
                answer = Console.ReadLine();
            }
            Console.WriteLine("Game over");
            flag = false;
        }
    }
}